package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.job.JobBO;
import com.ymk.service.IJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * <p>
 * job信息 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-05-05
 */
@Service
public class JobService implements IJobService {

    @Override
    public JobBO get(Map param) {
    return this.daoRouter.queryForObject("Job.loadJob",param);
    }

    @Override
    public List<JobBO> list(Map param) {
        return this.daoRouter.query("Job.loadJob",param);
    }

    @Override
    public List<JobBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("Job.loadJobForPage",pagination);
    }

    @Override
    public void post(JobBO param) {
        this.daoRouter.insert("AJob.insertJob",param);
    }

    @Override
    public void update(JobBO param) {
        this.daoRouter.update("AJob.updateJob",param);
    }

    @Override
    public void del(JobBO param) {
        this.daoRouter.update("AJob.delJob",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
